package org.stwy.lease.quit;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.stwy.lease.contract.ContractEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.rap.common.annotation.MetaData;
import com.rap.common.entity.BaseEntity;

/**
*版权信息 (c) RAP 保留所有权利.
*@author Rap.Codegen
*@Team RAP Team
*@Date 2015-4-19 22:11:54
*<p></p>
*
*@参与人：Rap.Codegen
*/
 
@MetaData(value = "退租")
@Entity
@Table(name = "stwy_quit")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class QuitEntity extends BaseEntity {
	private static final long serialVersionUID = 1L;
	@MetaData(value = "退租日期",comments="" )
	@Column(nullable = false,length = 0)
	@Temporal(TemporalType.DATE)
	private Date quitDate;
	
	@MetaData(value = "合同")
	@ManyToOne
	@JoinColumn(name = "contractId")
	private ContractEntity contract;
	
	@MetaData(value = "历史欠费合计",comments="" )
	@Column(nullable = true)
	private Double history;
	
	@MetaData(value = "租赁保证金历史交",comments="" )
	@Column(nullable = true)
	private Double deposit;
	
	@MetaData(value = "备注",comments="" )
	@Column(nullable = true,length = 1000)
	private String remark;
	
	@MetaData(value = "是否已退款",comments="",enumType="BooleanType")
	@Column(nullable = true)
	private Boolean isReturn=false;
	/**
	 * 退租日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	public Date getQuitDate(){
		return this.quitDate;
	}
	public void setQuitDate(Date quitDate){
		this.quitDate = quitDate;
	}
	/**
	 * 历史欠费合计
	 */
	public Double getHistory(){
		return this.history;
	}
	public void setHistory(Double history){
		this.history = history;
	}
	/**
	 * 租赁保证金历史交
	 */
	public Double getDeposit(){
		return this.deposit;
	}
	public void setDeposit(Double deposit){
		this.deposit = deposit;
	}
	/**
	 * 备注
	 */
	public String getRemark(){
		return this.remark;
	}
	public void setRemark(String remark){
		this.remark = remark;
	}
	public ContractEntity getContract() {
		return contract;
	}
	public void setContract(ContractEntity contract) {
		this.contract = contract;
	}
	public Boolean getIsReturn() {
		return isReturn;
	}
	public void setIsReturn(Boolean isReturn) {
		this.isReturn = isReturn;
	}
	
	
}
